package test.com.sms.selenium.singlepoint.util;

import org.openqa.selenium.By;

import test.com.sms.selenium.framework.SeleniumPageUtil;
import test.com.sms.selenium.util.SeleniumUtil;

public class SpReportsDefaultPageUtil extends SeleniumPageUtil {
	
	public final static By RD_IMG_SCORECARD 								= By.xpath("//a[text()='Scorecard']/../preceding-sibling::td[1]//img");
	public final static By RD_LINK_SCORECARD								= By.xpath("//a[text()='Scorecard']");
	public final static By RD_IMG_CHARTS 									= By.xpath("//a[text()='Charts']/../preceding-sibling::td[1]//img");
	public final static By RD_LINK_CHARTS 									= By.xpath("//a[text()='Charts']");
	public final static By RD_IMG_FAILURE_ANALYSIS_BY_ASSET					= By.xpath("//a[text()='Failure Analysis by Asset']/../preceding-sibling::td[1]//img");
	public final static By RD_LINK_FAILURE_ANALYSIS_BY_ASSET				= By.xpath("//a[text()='Failure Analysis by Asset']");
	public final static By RD_IMG_FAILURE_ANALYSIS_BY_MFG_MODEL 			= By.xpath("//a[text()='Failure Analysis by Mfg/Model']/../preceding-sibling::td[1]//img");
	public final static By RD_LINK_FAILURE_ANALYSIS_BY_MFG_MODEL 			= By.xpath("//a[text()='Failure Analysis by Mfg/Model']");
	
	public final static By RD_IMG_ASSETS 									= By.xpath("//a[text()='Assets']/../preceding-sibling::td[1]//img");
	public final static By RD_LINK_ASSETS 									= By.xpath("//a[text()='Assets']");
	public final static By RD_IMG_ALL_ASSETS 								= By.xpath("//a[text()='All Assets']/../preceding-sibling::td[1]//img");
	public final static By RD_LINK_ALL_ASSETS				 				= By.xpath("//a[text()='All Assets']");
	public final static By RD_IMG_ALL_ASSETS_WITH_ADDRESSES 				= By.xpath("//a[text()='All Assets with Addresses']/../preceding-sibling::td[1]//img");
	public final static By RD_LINK_ALL_ASSETS_WITH_ADDRESSES 				= By.xpath("//a[text()='All Assets with Addresses']");
	public final static By RD_IMG_WARRANTY_EXPIRING_IN_NEXT_3_MONTHS		= By.xpath("//a[text()='Warranty Expiring in Next 3 Months']/../preceding-sibling::td[1]//img");
	public final static By RD_LINK_WARRANTY_EXPIRING_IN_NEXT_3_MONTHS		= By.xpath("//a[text()='Warranty Expiring in Next 3 Months']");
	public final static By RD_IMG_WARRANTIES_THAT_HAVE_EXPIRED 				= By.xpath("//a[text()='Warranties that have Expired']/../preceding-sibling::td[1]//img");
	public final static By RD_LINK_WARRANTIES_THAT_HAVE_EXPIRED 			= By.xpath("//a[text()='Warranties that have Expired']");
	
	public final static By RD_IMG_CONTRACTS 								= By.xpath("//a[text()='Contracts']/../preceding-sibling::td[1]//img");
	public final static By RD_LINK_CONTRACTS 								= By.xpath("//a[text()='Contracts']");
	public final static By RD_IMG_ALL_CONTRACTS 							= By.xpath("//a[text()='All Contracts']/../preceding-sibling::td[1]//img");
	public final static By RD_LINK_ALL_CONTRACTS 							= By.xpath("//a[text()='All Contracts']");
	
	public final static By RD_IMG_INCIDENTS									= By.xpath("//a[text()='Incidents']/../preceding-sibling::td[1]//img");
	public final static By RD_LINK_INCIDENTS	 							= By.xpath("//a[text()='Incidents']");
	public final static By RD_IMG_ALL_INCIDENTS 							= By.xpath("//a[text()='All Incidents']/../preceding-sibling::td[1]//img");
	public final static By RD_LINK_ALL_INCIDENTS 							= By.xpath("//a[text()='All Incidents']");
	public final static By RD_IMG_ALL_INCIDENTS_EVENTS_ABULAR 				= By.xpath("//a[text()='All Incidents/Events Tabular']/../preceding-sibling::td[1]//img");
	public final static By RD_LINK_ALL_INCIDENTS_EVENTS_ABULAR 				= By.xpath("//a[text()='All Incidents/Events Tabular']");
	public final static By RD_IMG_ALL_INCIDENTS_REASONS_TABULAR 			= By.xpath("//a[text()='All Incidents/Reasons Tabular']/../preceding-sibling::td[1]//img");
	public final static By RD_LINK_ALL_INCIDENTS_REASONS_TABULAR 			= By.xpath("//a[text()='All Incidents/Reasons Tabular']");
	public final static By RD_IMG_AGING_REPORT 								= By.xpath("//a[text()='Aging Report']/../preceding-sibling::td[1]//img");
	public final static By RD_LINK_AGING_REPORT 							= By.xpath("//a[text()='Aging Report']");

	public final static By RD_IMG_CALL_CENTER_REPORTS 						= By.xpath("//a[text()='Call Center Reports']/../preceding-sibling::td[1]//img");
	public final static By RD_LINK_CALL_CENTER_REPORTS 						= By.xpath("//a[text()='Call Center Reports']");
	public final static By RD_IMG_AGENT_INCIDENT_VOLUME 					= By.xpath("//a[text()='Agent Incident Volume']/../preceding-sibling::td[1]//img");
	public final static By RD_LINK_AGENT_INCIDENT_VOLUME 					= By.xpath("//a[text()='Agent Incident Volume']");
	public final static By RD_IMG_AGENT_EVENT_VOLUME 						= By.xpath("//a[text()='Agent Event Volume']/../preceding-sibling::td[1]//img");
	public final static By RD_LINK_AGENT_EVENT_VOLUME 						= By.xpath("//a[text()='Agent Event Volume']");
	public final static By RD_IMG_AGENT_INCIDENT_EVENT_DETAILS 				= By.xpath("//a[text()='Agent Incident / Event Details']/../preceding-sibling::td[1]//img");
	public final static By RD_LINK_AGENT_INCIDENT_EVENT_DETAILS 			= By.xpath("//a[text()='Agent Incident / Event Details']");
	
	public final static By RD_IMG_SMS 										= By.xpath("//a[text()='SMS']/../preceding-sibling::td[1]//img");
	public final static By RD_LINK_SMS 										= By.xpath("//a[text()='SMS']");
	public final static By RD_IMG_QUARTERLY_REVIEW 							= By.xpath("//a[text()='Quarterly Review']/../preceding-sibling::td[1]//img");
	public final static By RD_LINK_QUARTERLY_REVIEW 						= By.xpath("//a[text()='Quarterly Review']");
	public final static By RD_IMG_PROFESSIONAL_SERVICES_LISTING 			= By.xpath("//a[text()='Professional Services Listing']/../preceding-sibling::td[1]//img");
	public final static By RD_LINK_PROFESSIONAL_SERVICES_LISTING 			= By.xpath("//a[text()='Professional Services Listing']");
	public final static By RD_IMG_SITE_AUDITS_ALL 							= By.xpath("//a[text()='Site Audits - All']/../preceding-sibling::td[1]//img");
	public final static By RD_LINK_SITE_AUDITS_ALL 							= By.xpath("//a[text()='Site Audits - All']");
	public final static By RD_IMG_SITE_AUDITS_MAS_COUNTS_COMPARED_TO_SP		= By.xpath("//a[text()='Site Audits - MAS counts compared to SP']/../preceding-sibling::td[1]//img");
	public final static By RD_LINK_SITE_AUDITS_MAS_COUNTS_COMPARED_TO_SP	= By.xpath("//a[text()='Site Audits - MAS counts compared to SP']");
	public final static By RD_IMG_SITE_AUDITS_MISSING_COMPONENTS_LOGISTICS	= By.xpath("//a[text()='Site Audits - Missing Components (Logistics)']/../preceding-sibling::td[1]//img");
	public final static By RD_LINK_SITE_AUDITS_MISSING_COMPONENTS_LOGISTICS	= By.xpath("//a[text()='Site Audits - Missing Components (Logistics)']");
	public final static By RD_IMG_SITE_AUDITS_CONTRACT_NOTICES_CONTRACTS	= By.xpath("//a[text()='Site Audits - Contract Notices (Contracts)']/../preceding-sibling::td[1]//img");
	public final static By RD_LINK_SITE_AUDITS_CONTRACT_NOTICES_CONTRACTS	= By.xpath("//a[text()='Site Audits - Contract Notices (Contracts)']");
	public final static By RD_IMG_SITE_AUDITS_CONFIRMED_ASSETS 				= By.xpath("//a[text()='Site Audits - Confirmed Assets']/../preceding-sibling::td[1]//img");
	public final static By RD_LINK_SITE_AUDITS_CONFIRMED_ASSETS	 			= By.xpath("//a[text()='Site Audits - Confirmed Assets']");
	public final static By RD_IMG_SITE_AUDITS_ASSETS_NOT_FOUND_SALES 		= By.xpath("//a[text()='Site Audits - Assets Not Found (Sales)']/../preceding-sibling::td[1]//img");
	public final static By RD_LINK_SITE_AUDITS_ASSETS_NOT_FOUND_SALES 		= By.xpath("//a[text()='Site Audits - Assets Not Found (Sales)']");
	public final static By RD_IMG_SITE_AUDITS_NEW_ASSETS_FOUND_SALES	 	= By.xpath("//a[text()='Site Audits - New Assets Found (Sales)']/../preceding-sibling::td[1]//img");
	public final static By RD_LINK_SITE_AUDITS_NEW_ASSETS_FOUND_SALES 		= By.xpath("//a[text()='Site Audits - New Assets Found (Sales)']");
	public final static By RD_IMG_SITE_AUDITS_ASSETS_FOUND_WITH_ISSUES 		= By.xpath("//a[text()='Site Audits - Assets Found with Issues']/../preceding-sibling::td[1]//img");
	public final static By RD_LINK_SITE_AUDITS_ASSETS_FOUND_WITH_ISSUES 	= By.xpath("//a[text()='Site Audits - Assets Found with Issues']");
	public final static By RD_IMG_SITE_AUDITS_SMS_GENS_SALES 				= By.xpath("//a[text()='Site Audits - SMS Gens (Sales)']/../preceding-sibling::td[1]//img");
	public final static By RD_LINK_SITE_AUDITS_SMS_GENS_SALES 				= By.xpath("//a[text()='Site Audits - SMS Gens (Sales)']");
	public final static By RD_IMG_SITE_AUDITS_LIST_ALL_FROM_MAS 			= By.xpath("//a[text()='Site Audits - List All From MAS']/../preceding-sibling::td[1]//img");
	public final static By RD_LINK_SITE_AUDITS_LIST_ALL_FROM_MAS 			= By.xpath("//a[text()='Site Audits - List All From MAS']");
	public final static By RD_IMG_SERVICE_ACTIVITY_REPORT 					= By.xpath("//a[text()='Service Activity Report']/../preceding-sibling::td[1]//img");
	public final static By RD_LINK_SERVICE_ACTIVITY_REPORT 					= By.xpath("//a[text()='Service Activity Report']");
	
	public final static By RD_IMG_CUSTOM_REPORTS 							= By.xpath("//a[text()='Custom Reports']/../preceding-sibling::td[1]//img");
	public final static By RD_LINK_CUSTOM_REPORTS 							= By.xpath("//a[text()='Custom Reports']");
	public final static By RD_IMG_COB_ASSET_REPORT 							= By.xpath("//a[text()='COB Asset Report']/../preceding-sibling::td[1]//img");
	public final static By RD_LINK_COB_ASSET_REPORT 						= By.xpath("//a[text()='COB Asset Report']");

	public final static By RD_IMG_CUSTOMER_GROUP_REPORTS 					= By.xpath("//a[text()='Customer Group Reports']/../preceding-sibling::td[1]//img");
	public final static By RD_LINK_CUSTOMER_GROUP_REPORTS 					= By.xpath("//a[text()='Customer Group Reports']");
	public final static By RD_IMG_INCIDENTS_EVENTS_TABULAR 					= By.xpath("//a[text()='Incidents/Events Tabular']/../preceding-sibling::td[1]//img");
	public final static By RD_LINK_INCIDENTS_EVENTS_TABULAR 				= By.xpath("//a[text()='Incidents/Events Tabular']");
	public final static By RD_IMG_INCIDENTS_REASONS_TABULAR 				= By.xpath("//a[text()='Incidents/Reasons Tabular']/../preceding-sibling::td[1]//img");
	public final static By RD_LINK_INCIDENTS_REASONS_TABULAR 				= By.xpath("//a[text()='Incidents/Reasons Tabular']");
	public final static By RD_SPAN_REPORT_OUTPUT									= By.id("ctl44_Report_ReportOutput");
	
	public static void enterReportsDefaultPage() {
		SpHomePageUtil.enter();
		SpHomePageUtil.enterReportsDefaultPage();
	}
	
	public static void waitForReportsDefaultPageToLoad() {
		SeleniumUtil.selectDefaultContent();
		SeleniumUtil.selectFrame(SpHomePageUtil.HOME_FRAME_CONTENT_NAME);
		SeleniumUtil.selectFrame(SpHomePageUtil.HOME_FRAME_MENU_NAME);
		SeleniumUtil.waitOnElements(new By[]{
				RD_IMG_SCORECARD, RD_IMG_CHARTS, RD_IMG_FAILURE_ANALYSIS_BY_ASSET, RD_IMG_FAILURE_ANALYSIS_BY_MFG_MODEL, RD_IMG_ASSETS, 
				RD_IMG_ALL_ASSETS, RD_IMG_ALL_ASSETS_WITH_ADDRESSES, RD_IMG_WARRANTY_EXPIRING_IN_NEXT_3_MONTHS, RD_IMG_WARRANTIES_THAT_HAVE_EXPIRED, 
				RD_IMG_CONTRACTS, RD_IMG_ALL_CONTRACTS, RD_IMG_INCIDENTS, RD_IMG_ALL_INCIDENTS, RD_IMG_ALL_INCIDENTS_EVENTS_ABULAR, RD_IMG_ALL_INCIDENTS_REASONS_TABULAR,
				RD_IMG_AGING_REPORT, RD_IMG_CALL_CENTER_REPORTS, RD_IMG_AGENT_INCIDENT_VOLUME, RD_IMG_AGENT_EVENT_VOLUME, RD_IMG_AGENT_INCIDENT_EVENT_DETAILS, 
				RD_IMG_SMS, RD_IMG_QUARTERLY_REVIEW, RD_IMG_PROFESSIONAL_SERVICES_LISTING, RD_IMG_SITE_AUDITS_ALL, RD_IMG_SITE_AUDITS_MAS_COUNTS_COMPARED_TO_SP, 
				RD_IMG_SITE_AUDITS_MISSING_COMPONENTS_LOGISTICS, RD_IMG_SITE_AUDITS_CONTRACT_NOTICES_CONTRACTS, RD_IMG_SITE_AUDITS_CONFIRMED_ASSETS,
				RD_IMG_SITE_AUDITS_ASSETS_NOT_FOUND_SALES, RD_IMG_SITE_AUDITS_NEW_ASSETS_FOUND_SALES, RD_IMG_SITE_AUDITS_ASSETS_FOUND_WITH_ISSUES,
				RD_IMG_SITE_AUDITS_SMS_GENS_SALES, RD_IMG_SITE_AUDITS_LIST_ALL_FROM_MAS, RD_IMG_SERVICE_ACTIVITY_REPORT, RD_IMG_CUSTOMER_GROUP_REPORTS,
				RD_IMG_CUSTOM_REPORTS, RD_IMG_INCIDENTS_EVENTS_TABULAR, RD_IMG_INCIDENTS_REASONS_TABULAR
			});
		
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RD_IMG_SCORECARD));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RD_IMG_CHARTS));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RD_IMG_FAILURE_ANALYSIS_BY_ASSET));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RD_IMG_FAILURE_ANALYSIS_BY_MFG_MODEL));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RD_IMG_ASSETS));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RD_IMG_ALL_ASSETS));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RD_IMG_ALL_ASSETS_WITH_ADDRESSES));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RD_IMG_WARRANTY_EXPIRING_IN_NEXT_3_MONTHS));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RD_IMG_WARRANTIES_THAT_HAVE_EXPIRED));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RD_IMG_CONTRACTS));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RD_IMG_ALL_CONTRACTS));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RD_IMG_INCIDENTS));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RD_IMG_ALL_INCIDENTS));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RD_IMG_ALL_INCIDENTS_EVENTS_ABULAR));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RD_IMG_ALL_INCIDENTS_REASONS_TABULAR));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RD_IMG_AGING_REPORT));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RD_IMG_CALL_CENTER_REPORTS));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RD_IMG_AGENT_INCIDENT_VOLUME));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RD_IMG_AGENT_EVENT_VOLUME));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RD_IMG_AGENT_INCIDENT_EVENT_DETAILS));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RD_IMG_SMS));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RD_IMG_QUARTERLY_REVIEW));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RD_IMG_PROFESSIONAL_SERVICES_LISTING));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RD_IMG_SITE_AUDITS_ALL));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RD_IMG_SITE_AUDITS_MAS_COUNTS_COMPARED_TO_SP));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RD_IMG_SITE_AUDITS_MISSING_COMPONENTS_LOGISTICS));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RD_IMG_SITE_AUDITS_CONTRACT_NOTICES_CONTRACTS));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RD_IMG_SITE_AUDITS_CONFIRMED_ASSETS));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RD_IMG_SITE_AUDITS_ASSETS_NOT_FOUND_SALES));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RD_IMG_SITE_AUDITS_NEW_ASSETS_FOUND_SALES));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RD_IMG_SITE_AUDITS_ASSETS_FOUND_WITH_ISSUES));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RD_IMG_SITE_AUDITS_SMS_GENS_SALES));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RD_IMG_SITE_AUDITS_LIST_ALL_FROM_MAS));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RD_IMG_SERVICE_ACTIVITY_REPORT));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RD_IMG_CUSTOMER_GROUP_REPORTS));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RD_IMG_CUSTOM_REPORTS));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RD_IMG_INCIDENTS_EVENTS_TABULAR));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RD_IMG_INCIDENTS_REASONS_TABULAR));
	}
}
